
#ifndef _MEMBER_BSTYLE_H_
#define _MEMBER_BSTYLE_H_

#include <BMap>
#include <BColor>
#include <BIcon>
#include <BImage>
#include <BFont>
#include <BStyle>
#include <BWidget>

#define style_member(style)		((member_BStyle*)((BStyle*)style)->_ptr)

namespace BWE
{
	class member_BStyle
	{
	public:
		member_BStyle(BStyle* style);
		~member_BStyle();

		void init(const BColor& color);
		bool apply(BWidget* widget) const;
		void overlap(const BStyle* style);

		BStyle*				boss;
		BString				type;
		bool				heritable;
		bool				dirty;

		BMap<StyleRole, BValue>			valueMap;
		BMap<StyleRole, BColor>			colorMap;
		BMap<StyleRole, BImageHolder>	imageMap;
		BMap<StyleRole, BIconHolder>	iconMap;
		BMap<BString, BFontHolder>		namedFontMap;
		BMap<BString, BColor>			namedColorMap;
		BMap<BString, BImageHolder>		namedImageMap;
		BMap<BString, BIconHolder>		namedIconMap;
		BMap<BString, BString>			transMap;
		BArray<BStyleHolder>			subs;
		BArray<BStyleHolder>			children;
	};
}

#endif
